const path = require('path');
const htmlWebapckPlugin = require('html-webpack-plugin');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');

module.exports = {
    entry: path.join(__dirname, 'index.js'),
    output: {
        filename: 'bundle.js',
        path: path.join(__dirname, 'dist')
    },
    mode: 'production',
    plugins: [
        new CleanWebpackPlugin(),
        new htmlWebapckPlugin({
            title:"webpack模板",
            template: path.join(__dirname,"index1.html"),// 模板html
        }),// webpack html插件
    ]
};